package June.Test01extends;

public class Extends01Test {
    public static void main(String[] args) {
        Extends01Eldest eld=new Extends01Eldest();
        String eldname = eld.name();
        System.out.println(eldname);
        eld.money();
        Extends01Son son=new Extends01Son();
        String sonname = son.name();
        System.out.println(sonname);
        son.lookHome();
        Extends01Father fa=new Extends01Father();
        //这里01Father继承了01GFather的成员变量name
        fa.name="刘魔";
        String faName = fa.name;
        System.out.println(faName+",");
        System.out.println("--------------------");
        eld.eat();
        eld.drink();
        eld.song();

    }
}
